Skip to content

Automate Power Apps Testing with Test Studio and Test Engine

Billy Peralta

3 min read

Automate Power Apps Testing with Test Studio and Test Engine

Topics: O365, M365, SharePoint Online, PowerApps, Test Automation

The demo shows how to utilize the Test automation feature of PowerApps to make sure that our Apps are working as expected.

Step 1: Build a simple app to test

First, let’s create a Blank Canvas App.

Creating a List named "Test Site List Only"

Then name our App “Test Automate.”

Creating a List named "Test Site List Only"

Once the App is built, we will insert two Text Input and two labels on our Canvas.

Creating a List named "Test Site List Only"

For each Text Input, let’s remove the default value.

Creating a List named "Test Site List Only"

We will add another “Label” at the bottom, and we will call it “LabelSum,” let’s also get the sum of both TextInput1 and TextInput2, and we are going to display it on text( we also make the font bigger as well)

Creating a List named "Test Site List Only"

Step 2: Record a test case in Test Studio

Save our change, open the Test Studio by clicking on Advanced Tools, then click on “Open tests.”

Creating a List named "Test Site List Only"

It will now open the “Test Studio” in a new tab.

Creating a List named "Test Site List Only"

Let now record and try writing Test Cases by clicking on the Record button.

Creating a List named "Test Site List Only"

Try adding a value in “TextInput1” and also “Textinput2”, you will notice that it records on the left that each step that we did. Click on “Done”

Creating a List named "Test Site List Only"

You will redirect to the “Test Studio” with the Test Case filled up through our record.

Creating a List named "Test Site List Only"

Step 3: Add an Assert step

We will now add a new step called “Assert,” which checks and validates if a given condition returns true. We can do that by clicking on the last step of our test case, then clicking on “Insert step below,” then selecting “Assert.”

Creating a List named "Test Site List Only"

It should add a new step for Assert.

Creating a List named "Test Site List Only"

Assert can accept two arguments. The First Arguments is the condition that we wanted to check, and the Second Argument agrees with a string that will be displayed if the first Argument is not true

Creating a List named "Test Site List Only"

Step 4: Run the test

We will now Publish our changes and click on the “Play” button.

Creating a List named "Test Site List Only"

Since the condition we set in our set returns true, our error message didn’t show up. Now let us change the value and make sure the Assert will encounter an error.

Creating a List named "Test Site List Only"

Now Assert encountered an error because we are trying to find the text “3” to our LabelSum

Creating a List named "Test Site List Only"

Testing is a pretty nifty feature to ensure that the App we built is working perfectly through testing. Note that this feature is still on the “Experimental” stage, so I don’t suggest using it on your production projects.

If you are building canvas apps your business depends on and want a testing and release process around them, see my Power Platform consulting page.

Need help building or stabilizing Power Apps connected to SharePoint?

I help organizations design Power Apps and Power Automate solutions that are maintainable, governed, and easier to support after launch.

16+ years experience Microsoft certified Government & enterprise

Free SharePoint planning resource

Solving the technical issue is only part of the Microsoft 365 problem.

Use the checklist to review the governance, permission, ownership, and support decisions that often determine whether a SharePoint solution succeeds long term.

Download the Checklist

Billy Peralta

SharePoint architect & Microsoft 365 consultant • 16+ years of experience

If you have questions about your SharePoint environment, feel free to reach out.

LinkedIn GitHub

Continue Reading

View all posts